package com.shujia.java.day15.demo3;

import java.util.Arrays;

/**
* @Description: Demo3 �鿴�ֽ���ô�ϲ�Ϊ�ַ���
* @Author: �����
* @Date: 2019/8/17 16:40
*/

public class Demo3 {
    public static void main(String[] args) {
        //Ӣ��ת�ֽ�
        String str="abcdefg";
        //ת��Ϊ�ֽ�����
        System.out.println(Arrays.toString(str.getBytes()));
        //����ת�ֽ�
        String str1="�Ұ��й����Ǻ���";
        //ת��Ϊ�ֽ�����  �����������ֽ� ����ͺϲ�һ���ֽ�
        System.out.println(Arrays.toString(str1.getBytes()));
        byte[] bytes = {-26,-120,-111};
        System.out.println(new String(bytes,0,3));

        byte[] bytes1 = {-26,-120,-110};
        System.out.println(new String(bytes1,0,3));
        byte[] bytes2 = {-26,-111,-110};
        System.out.println(new String(bytes2,0,3));
    }
}
